Skip to content

Conversation

@ZenithDevHQ
Copy link
Collaborator

Summary

  • Update Checker (2.9): GitHub API integration for version checking with 5-minute caching, changelog support, and optional auto-download
  • Spawnkill Prevention (2.10): Configurable spawn protection after respawn to prevent immediate killing
  • WarZone Per-Zone Config (3.0): Flag-based zone customization allowing admins to override default zone behaviors

Changes

Feature 1: Update Checker

  • New UpdateChecker.java class with GitHub Releases API integration
  • 5-minute response caching to reduce API calls
  • Optional auto-download functionality for updates
  • Integrated into HyperFactions.java enable() method

Feature 2: Spawnkill Prevention

  • New SpawnProtection.java record for tracking protection state
  • Protection applies automatically after respawn
  • Configurable options:
    • enabled (default: true)
    • durationSeconds (default: 5)
    • breakOnAttack (default: true)
    • breakOnMove (default: true)
  • Added DENIED_SPAWN_PROTECTED PvP result

Feature 3: WarZone Per-Zone Config

  • New ZoneFlags.java with flag constants
  • Zone flags override default zone type behaviors
  • Available flags: pvp_enabled, friendly_fire, build_allowed, container_access, interact_allowed, item_drop, item_pickup, mob_spawning, mob_damage, hunger_loss, fall_damage
  • New admin command: /f admin zoneflag [flag] [true|false|clear]
  • Flags persist across restarts via JSON storage

Files Changed

  • New Files:

    • src/main/java/com/hyperfactions/update/UpdateChecker.java
    • src/main/java/com/hyperfactions/data/SpawnProtection.java
    • src/main/java/com/hyperfactions/data/ZoneFlags.java
    • gradle.properties
  • Modified Files:

    • HyperFactions.java - UpdateChecker integration
    • FactionCommand.java - zoneflag admin command
    • HyperFactionsConfig.java - Spawn protection config
    • Zone.java - Flags field and methods
    • PlayerListener.java - Spawn protection on respawn
    • CombatTagManager.java - Spawn protection management
    • ZoneManager.java - Flag management methods
    • ProtectionChecker.java - Flag-based protection checks
    • JsonZoneStorage.java - Flags serialization

Test plan

  • Server starts with update check enabled, logs version comparison
  • Player respawns with spawn protection (5s default)
  • Protected player cannot be damaged
  • Protection breaks on attack/move (if configured)
  • Create SafeZone, verify default no-PvP
  • /f admin zoneflag pvp_enabled true enables PvP in SafeZone
  • Create WarZone, verify default PvP enabled
  • /f admin zoneflag pvp_enabled false disables PvP in WarZone
  • Clear flag reverts to default
  • Flags persist after restart

- Update Checker (2.9): GitHub API integration with 5-min caching,
  changelog support, and optional auto-download functionality

- Spawnkill Prevention (2.10): Configurable spawn protection after
  respawn with duration, break-on-attack, and break-on-move options

- WarZone Per-Zone Config (3.0): Flag-based zone customization with
  /f admin zoneflag command. Supports PvP, building, containers,
  item handling, mob spawning, and player effect flags
…ndation

Technical Debt Resolution:
- Add auto-save periodic task with configurable interval (default 5 min)
- Create TeleportContext record with builder pattern for cleaner teleport API
- Add factionClaimsIndex reverse lookup map for O(1) faction claims query
- Add invite cleanup integration in periodic tasks

Public API Expansion:
- Add manager getters to HyperFactionsAPI (claim, relation, combat, power, zone, teleport)
- Add EventBus integration methods for cross-mod event subscriptions
- Create EconomyAPI interface for faction treasury operations

Economy Foundation:
- Create FactionEconomy record for balance and transaction tracking
- Create EconomyManager implementing EconomyAPI with deposit/withdraw/transfer
- Add economy config fields (currency name, symbol, starting balance)
- Add ECONOMY log type to FactionLog for transaction logging
derrickmehaffy added a commit that referenced this pull request Jan 25, 2026
…flags into dev/phase1

Merged branches:
- feat/critical-bug-fixes: Item pickup protection + teleport damage cancellation
- feat/update-checker-spawnkill-zone-flags: Update checker, spawn protection, zone flags, technical debt fixes

Implemented features:
- Bug #3: SafeZone item pickup protection (P0)
- Phase 2.8: Warmup damage monitoring (P0)
- Phase 2.9: Update checker with GitHub releases (P1)
- Phase 2.10: Spawnkilling prevention system (P1)
- Phase 3.0: WarZone per-zone configuration (P1)
- Technical debt: Auto-save, invite cleanup, claim index, TeleportContext

Conflict resolution:
- HyperFactionsPlugin.java: Merged registerTeleportSystems() with updated periodic task comments
- DEVELOPMENT_ROADMAP.md: Updated to mark all implemented features as complete

All features tested and ready for integration testing.
derrickmehaffy added a commit that referenced this pull request Jan 25, 2026
Completely overhauled DEVELOPMENT_ROADMAP.md:
- Removed all completed items (moved to CHANGELOG.md)
- Reduced from 2424 to 420 lines (83% reduction)
- Focus on remaining work only
- Recalculated phases and timelines
- Clearer version planning (v1.0 → v1.1 → v1.2 → v1.3)
- Immediate priorities: GUI overhaul, API docs, role permissions

Updated CHANGELOG.md:
- Added [Unreleased] section with recent completions
- Documented Bug #3, Phase 2.8, 2.9, 2.10, 3.0
- Listed all technical improvements
- Organized by Phase 1, 2, and 3 completions

Summary of completed work:
- Phase 1: 100% complete (all quick wins and critical bugs)
- Phase 2: 78% complete (7/9 items)
- Phase 3: 14% complete (1/7 items)
- Technical debt: All P0 items resolved

Next priorities:
1. GUI System Overhaul (Phase 2.11) - 2-3 weeks
2. API Documentation (Phase 3.1) - 1 week
3. Role Permissions (Phase 3.2) - 1-2 weeks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants